package com.chixing.day07.ProtoType;

public class Product {
    private int proId;
    private String proName;
    private float proPrice;

    public Product() {

    }

    public int getProId() {
        return proId;
    }

    public void setProId(int proId) {
        this.proId = proId;
    }

    public String getProName() {
        return proName;
    }

    public void setProName(String proName) {
        this.proName = proName;
    }

    public float getProPrice() {
        return proPrice;
    }

    public void setProPrice(float proPrice) {
        this.proPrice = proPrice;
    }

    @Override
    public String toString() {
        return "Product{" +
                "proId=" + proId +
                ", proName='" + proName + '\'' +
                ", proPrice=" + proPrice +
                '}';
    }

    //浅克隆
    @Override
    protected Object clone() throws CloneNotSupportedException {
        Product proClone = new Product();
        proClone.proId = this.proId;
        proClone.proName = this.proName;
        proClone.proPrice = this.proPrice;
        return proClone;
    }


}
